-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REX/Tokenomics 2.0 #150
REX/Tokenomics 2.0 #150
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed changes, looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested a change to add one test.
BOOST_REQUIRE_EQUAL( asset::from_string("25000.0000 REX"), get_buyrex_result( mark, core_sym::from_string("2.5000") ) ); | ||
produce_blocks(2); | ||
produce_block(fc::days(5)); | ||
BOOST_REQUIRE_EQUAL( success(), setrexmature( 21, true, true ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a setrexmature
test with a bucket our of range 0, -1, 100? That should error out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1 would be impossible since it's an unsigned int, 100 would be 100 days, and we don't really need to test that if it's already testing 21, and over max would overflow so not much of a reason to test that either (not a realistic case anyway).
0 would just be an instant maturation period, and should be valid. Would be a good test to make sure that that works as expected. I can add a test there for the next release, but I need to get this RC out to jungle asap so I can test the UI for it before launch date on a real network.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one line test is in PR #151 . Its a negative test, and attempts a zero-day maturity and captures the failure. Once the PR is merged into this branch, I'll approve this PR.
…ro-day-rex-mature-test validate zero day maturity fails
This PR merges in the tokenomics changes from the reference contracts defined in these PRs:
AntelopeIO/reference-contracts#98
AntelopeIO/reference-contracts#80
https://github.com/eosnetworkfoundation/eosio.reward/